include: package:flutter_lints/flutter.yaml

linter:
  rules:
    #
    no_leading_underscores_for_local_identifiers: false
    package_names: false
    # disable in favor of a single positional boolean parameter
    avoid_positional_boolean_parameters: false
    #
    always_declare_return_types: true
    avoid_dynamic_calls: true
    avoid_multiple_declarations_per_line: true
    avoid_type_to_string: true
    avoid_unused_constructor_parameters: true
    cancel_subscriptions: true
    close_sinks: true
    no_runtimeType_toString: true
    omit_local_variable_types: true
    parameter_assignments: true
    prefer_asserts_in_initializer_lists: true
    prefer_final_in_for_each: true
    prefer_final_locals: true
    prefer_if_elements_to_conditional_expressions: true
    prefer_null_aware_method_calls: true
    prefer_single_quotes: true
    test_types_in_equals: true
    tighten_type_of_initializing_formals: true
    type_annotate_public_apis: true
    unawaited_futures: true
    unnecessary_breaks: true
    unnecessary_parenthesis: true
    unnecessary_raw_strings: true
    unnecessary_statements: true
    use_is_even_rather_than_modulo: true
    use_late_for_private_fields_and_variables: true
    use_named_constants: true
    use_raw_strings: true
    use_setters_to_change_properties: true
    use_string_buffers: true
    use_super_parameters: true
    use_to_and_as_if_applicable: true

analyzer:
  errors:
    invalid_use_of_protected_member: error
  exclude:
    - lib/**.g.dart
  enable-experiment:
    - records
    - patterns
    - sealed-class